package gew.data;

import gew.utils.SqlUtils;
import java.io.Serializable;
import java.sql.ResultSet;
import java.sql.SQLException;

public class DimensionValue implements Serializable {
    
    public static DimensionValue NOT_FOUND = new DimensionValue(0, "not found", SqlUtils.EMPTY, SqlUtils.EMPTY, SqlUtils.EMPTY, SqlUtils.EMPTY, SqlUtils.EMPTY, SqlUtils.EMPTY, SqlUtils.EMPTY, SqlUtils.EMPTY, SqlUtils.EMPTY, SqlUtils.EMPTY);

    private static final int ID = 1;
    private static final int NAME = 2;
    private static final int CODE = 3;
    private static final int URL_CODE = 4;
    private static final int KEY_WORDS = 5;
    private static final int NAME_GEN = 6;
    private static final int NAME_ACC = 7;
    private static final int FONT_AWESOME = 8;
    private static final int DESCRIPTION = 9;
    private static final int COLOR = 10;
    private static final int UOM = 11;
    private static final int DESCRIPTION_META = 12;
    
    private final Integer id;
    private final String name;
    private final String code;
    private final String urlCode;
    private final String keyWords;
    private final String nameGen;
    private final String nameAcc;
    private final String fontAwesome;
    private final String description;
    private final String color;
    private final String uom;
    private final String descriptionMeta;

    DimensionValue(Integer id, String name, String code, String urlCode, String keyWords, String nameGen, String nameAcc, String fontAwesome, String description, String color, String uom, String descriptionMeta) {
        this.id = id;
        this.name = name;
        this.code = code;
        this.urlCode = urlCode;
        this.keyWords = keyWords;
        this.nameGen = nameGen;
        this.nameAcc = nameAcc;
        this.fontAwesome = fontAwesome;
        this.description = description;
        this.color = color;
        this.uom = uom;
        this.descriptionMeta = descriptionMeta;
    }

    public DimensionValue(ResultSet rs) throws SQLException {
        this.id = rs.getInt(ID);
        this.name = rs.getString(NAME);
        this.code = rs.getString(CODE);
        this.urlCode = rs.getString(URL_CODE);
        this.keyWords = rs.getString(KEY_WORDS);
        this.nameGen = rs.getString(NAME_GEN);
        this.nameAcc = rs.getString(NAME_ACC);
        this.fontAwesome = rs.getString(FONT_AWESOME);
        this.description = rs.getString(DESCRIPTION);
        this.color = rs.getString(COLOR);
        this.uom = rs.getString(UOM);
        this.descriptionMeta = rs.getString(DESCRIPTION_META);
    }
    
    public String getNameAcc() {
        return nameAcc;
    }

    public String getDescriptionMeta() {
        return descriptionMeta;
    }

    public Integer getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }

    public String getUrlCode() {
        return urlCode;
    }

    public String getKeyWords() {
        return keyWords;
    }

    public String getNameGen() {
        return nameGen;
    }

    public String getFontAwesome() {
        return fontAwesome;
    }

    public String getDescription() {
        return description;
    }

    public String getColor() {
        return color;
    }

    public String getUom() {
        return uom;
    }
        
}
